<%@ page import="java.util.List" %>
<%@ page import="com.mystore.vo.GoodVO" %>
<%@ page import="com.mystore.util.PageUtil" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <title>我的购物车</title>
    <link href="../../css/main.css" rel="stylesheet">
    <style>
        table thead tr th{
            text-align: center;
        }
    </style>
</head>
<body>
<div class="container text-center">
    <jsp:include page="head.jsp"/>

    <div class="table-responsive">
        <caption><h2>我的购物车</h2></caption>
        <table class="table table-bordered table-hover  text-center">
            <thead>
            <tr >
            <th>编号</th>
            <th>名称</th>
            <th>详细信息</th>
            <th>价格(元)</th>
            <th>数量(个)</th>
            <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <%
                List<GoodVO> list = (List<GoodVO>) request.getAttribute("cart");
                for (GoodVO goodVO : list) {
            %>
            <tr>
                <td><%=goodVO.getId()%>
                </td>
                <td><%=goodVO.getName()%>
                </td>
                <td><%=goodVO.getMsg()%>
                </td>
                <td>
                    <%=goodVO.getPrice()%>
                </td>
                <td>
                    <%=goodVO.getNum()%>
                </td>

                <td><button >购买商品</button></td>
            </tr>

            <%
                }
            %>
            </tbody>

        </table>
    </div>


    <%--<div class="add">--%>
    <%--<a href="/jsp/addNews.jsp">添加新闻</a>--%>
    <%--</div>--%>
</div>
</body>
</html>
